
//storage for DAC int and corresponding time delay value that is populated by calibration fucntion
//first column is DAC 12 bit value for voltage out
//second column is SHORT mode measured millisecond from calibration function
//third column is LONG mode measured millisecond from calibration function
//access between second and third colum is by offset variable "y"

int time_array[17][3]=  
{
  {
  // 0, 1, -1      }  //set these to neg one to test if uncalibrated in "SHORT" or "LONG" mode
    0, -1, -1      }  //set these to neg one to test if uncalibrated in "SHORT" or "LONG" mode
  ,
  {
    255, 0, 0      }
  ,
  {
    511, 0, 0      }
  ,
  {
    767, 0, 0      }
  ,
  {
    1023, 0, 0     }
  ,
  {
    1279, 0, 0     }
  ,
  {
    1535, 0, 0      }
  ,
  {
    1791, 0, 0      }
  ,
  {
    2047, 0, 0      }
  ,
  {
    2303, 0, 0      }
  ,
  {
    2559, 0, 0      }
  ,
  {
    2815, 0, 0      }
  ,
  {
    3071, 0, 0      }
  ,
  {
    3327, 0, 0      }
  ,
  {
    3583, 0, 0      }
  ,
  {
    3839, 0, 0      }
  ,
  {
    4095, 0, 0      }
};

//
//char* volt_array[] =          //calculated voltage outputs for DAC
//{
//  "0.00", "0.31", "0.62", "0.94", 
//  "1.25", "1.56", "1.87", "2.19",
//  "2.50", "2.81", "3.12", "3.44",
//  "3.75", "4.06", "4.37", "4.69", 
//  "5.00"
//};

char* messages[] =
{
  "?l",               //0 - blank line
  "Reduce FEEDBACK",  //1
  " Increase GAIN",    //2
  "  Re-Calibrate",    //3
  "Delay Range",      //4
  " CALIBRATE for",   //5
  "<<Calibrating>>",  //6
  "  Reduce TIME",    //7
  " Signal TIMEOUT",   //8
  "    Detected",     //9
  "Delay too SHORT",  //10
  "Delay too LONG",   //11
  " ",                //12
  "Reading Tap ",         //13
  " ",                //14
  "<<BYPASS  MODE>>",  //15
  " ",                //16
  "<<RELEASE CAL>>",   //17
  " ",                //18
  " ",                //19
  
// can use these with odd/even commands by adding "y" to array pointer

  "SHORT Delay Mode",  //20
  "LONG Delay Mode",   //21
  "SHORT Calibrated",  //22
  "LONG Calibrated",   //23
  "Start SHORT Cal",   //24
  "Start LONG Cal",    //25

};




//first column is position of first valid SHORT time value
//first column is position of first valid LONG time value
//access between first and second colum is by offset variable "y"

int max_min_pos[2][2]=   //position of max and min timing values measured 
{
  {
    0,0    }
  ,
  {
    0,0    }
};



//first column is SHORT mode measured millisecond from calibration function
//second column is LONG mode measured millisecond from calibration function
//access between first and second colum is by offset variable "y"

int max_min_val[2][2]=   //array of max and min timing values measured 
{
  {
    0,0    }
  ,
  {
    0,0    }
};

